//前端随机生成的token,后期是要确保两个token同时存在,保证可以访问其他的页面
const createToken=function generateToken() {
    let length=12;
    let charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    let token = "";
    for (let i = 0; i < length; i++) {
        let randomIndex = Math.floor(Math.random() * charset.length);
        token += charset[randomIndex];
    }
    return token;
}

export  default createToken;
